import Vue from 'vue'
import Router from 'vue-router'
//login
import Login from '../components/Login'
import Forget from '../components/Forget'
import Register from '../components/Register'
//pages
import Pages from '../components/Pages'
import Cloud from '../components/CloudPage'
import Upload from '../components/UploadPage'
import Upfile from '../components/UpfilePage'
import Service from '../components/ServicePage'

export default new Router({
  routes: [
    {
      path: '',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/forget',
      name: 'Forget',
      component: Forget
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    },
    {
      path: '/pages',
      name: 'Pages',
      component: Pages,
      redirect: '/pages/cloud',
      children: [{
          path: '/pages/cloud',
          name: 'Cloud',
          component: Cloud
        }, {
          path: '/pages/upload',
          name: 'Upload',
          component: Upload
        },
        {
          path: '/pages/upfile',
          name: 'Upfile',
          component: Upfile
        },
        {
          path: '/pages/service',
          name: 'Service',
          component: Service
        }
      ]
    }
  ]
})

Vue.use(Router)